package com.tanhua.admin.controller;

import com.tanhua.admin.service.DashBoardService;
import com.tanhua.model.vo.CumulativeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
public class DashBoardController {

    @Autowired
    DashBoardService dashBoardService;

    @GetMapping("/summary")
    public ResponseEntity summary(){
        CumulativeVo vo = dashBoardService.summary();
        return ResponseEntity.ok(vo);
    }

}
